From: Georges Basile Stavracas Neto Date: Thu, 25 Feb 2021 13:31:47 +0000 (-0300) Subject: layout: Don't build input region rects on Wayland X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~197 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bc0974618fdcfd7b949d3d43d95e4efc466438ef;p=gnome-shell.git layout: Don't build input region rects on Wayland This is an X11-specific routine, and building the list of input region rects on Wayland is a waste, since it incurs in many trampolines only to throw them in the trash. Don't build input region rects on Wayland. By modifying the 'wantsInputRegion' variable, it also skips actors that only update input, which is another small optimization for Wayland. Part-of: --- diff --git a/js/ui/layout.js b/js/ui/layout.js index c2c8151c1..bf251ba00 100644 --- a/js/ui/layout.js +++ b/js/ui/layout.js @@ -959,7 +959,10 @@ var LayoutManager = GObject.registerClass({ let rects = [], struts = [], i; let isPopupMenuVisible = global.top_window_group.get_children().some(isPopupMetaWindow); - const wantsInputRegion = !isPopupMenuVisible && Main.modalCount === 0; + const wantsInputRegion = + !isPopupMenuVisible && + Main.modalCount === 0 && + !Meta.is_wayland_compositor(); for (i = 0; i < this._trackedActors.length; i++) { let actorData = this._trackedActors[i];